---
title: clsPolicyHeaderAssociationFactory
summary: API reference for clsPolicyHeaderAssociationFactory.
status: draft
owner: SAIF Corporation
last_reviewed: 2026-08-21
library: SAIF.Business.View.Policy
reference_type: embedded
---

# clsPolicyHeaderAssociationFactory

`clsPolicyHeaderAssociationFactory` is the orchestration point for the current association-header model. It loads the available association types, separates them into groupable and non-groupable categories, delegates raw retrieval to the association-type implementations, and returns a unified ordered set of `IPolicyHeaderAssociation` rows for one policy. Analysis ties this workflow to the preferred-type override rule in [BR-VP-015](../../business-rules.md#br-vp-015-preferred-association-type-overrides-derived-type), and unresolved codes are represented upstream by `clsUnknownAssociationTypeCode` when association-type resolution cannot find a match.*

## Purpose
- Build the current association-header view for one policy from raw association-type providers.
- Group target association types by category so grouped header retrieval can be delegated through `clsAssociationTypeCode.GetGroupedPolicyHeaderAssociations`.*
- Return a merged, ordered association-header sequence that callers can consume without knowing the underlying association-type retrieval strategy.

## Context
- Namespace: `SAIF.Business.View.Policy`
- Assembly/package: `SAIF.Business.View.Policy` (embedded)

## Public members
| Member | Signature | Purpose |
| --- | --- | --- |
| `GetPolicyHeaderAssociations` | `Public Shared Function GetPolicyHeaderAssociations(ByVal inDPI As IDataPortalInfo, ByVal inPolicyNumber As Decimal) As IEnumerable(Of IPolicyHeaderAssociation)` | Retrieves association headers for a policy using the full set of available association types. |
| `GetPolicyHeaderAssociations` | `Public Shared Function GetPolicyHeaderAssociations(ByVal inDPI As IDataPortalInfo, ByVal inPolicyNumber As Decimal, ByVal inTargetAssociationTypes As IEnumerable(Of IPolicyAssociationType)) As IEnumerable(Of IPolicyHeaderAssociation)` | Builds association headers for a policy from a caller-supplied set of association types. |
| `GetPolicyHeaderAssociations` | `Public Shared Function GetPolicyHeaderAssociations(ByVal inPolicyNumber As Decimal, ByVal inAssociations As IEnumerable(Of IPolicyAssociationType)) As IEnumerable(Of IPolicyHeaderAssociation)` | Expands each supplied association type into header rows and orders the combined result by policy number. |

## Behavioral notes
- The main overload loads all available types through `clsAssociationTypeFactory.GetAssociationTypes`, then partitions them into groupable and non-groupable sets based on `AssociationCategory`.
- Groupable types are batched by category and delegated to `clsAssociationTypeCode.GetGroupedPolicyHeaderAssociations`, while non-groupable types call each type's own `GetPolicyHeaderAssociations` implementation.
- The final result is the union of both paths, returned as a new list of `IPolicyHeaderAssociation` values.
- Analysis attributes preferred-association-type override behavior to this factory workflow under [BR-VP-015](../../business-rules.md#br-vp-015-preferred-association-type-overrides-derived-type); the exact override handoff occurs in collaborating association-type code rather than directly inside these three public methods.*
- When association-type resolution fails, the broader association pipeline uses `clsUnknownAssociationTypeCode` so callers still receive a non-null type object on the resulting headers.*

## Constraints and usage notes
- This class is an in-memory coordinator only; it does not expose SQL directly.
- The file also contains `clsAssociationTypeFactory`, but that separate public type has its own documentation page elsewhere and is not duplicated here.

> **Note:** Statements marked with * were inferred from code structure, naming conventions, or
> contextual evidence where direct confirmation was not available in source artifacts. Statements
> marked with ** could not be confirmed; treat as unknown until verified.

## Sources
- `SAIF.Business.View.Policy/Associations/clsPolicyAssociationFactory.vb`
- `SAIF.Business.View.Policy/Associations/clsAssociationTypeCode.vb`
